home *** CD-ROM | disk | FTP | other *** search
- program TstChStm;
-
- uses
- SysUtils,
- Classes,
- AAChrStm in 'AAChrStm.pas';
-
- var
- InStm : TFileStream;
- OutStm : TFileStream;
- InChStm : TaaInCharStream;
- OutChStm : TaaOutCharStream;
- Ch : char;
- SmallBuf : array [0..19] of byte;
- begin
- InStm := nil;
- InChStm := nil;
- OutStm := nil;
- OutChStm := nil;
- try
- InStm := TFileStream.Create('c:\aaclass.log', fmOpenRead+fmShareDenyNone);
- InChStm := TaaInCharStream.Create(InStm);
- OutStm := TFileStream.Create('c:\test.out', fmCreate);
- OutChStm := TaaOutCharStream.Create(OutStm);
- {OutChStm.EndOfLine := eolLF;}
-
- InChStm.Read(SmallBuf, sizeof(SmallBuf));
- OutChStm.Write(SmallBuf, sizeof(SmallBuf));
-
- Ch := InChStm.GetChar;
- while (Ch <> #0) do begin
- OutChStm.PutChar(Ch);
- Ch := InChStm.GetChar;
- end;
- finally
- OutChStm.Free;
- OutStm.Free;
- InChStm.Free;
- InStm.Free;
- end;
- end.
-